home *** CD-ROM | disk | FTP | other *** search
- <%
- on error resume next
- dim SecurityBox
- if (Request.Form("Login") = "Login") then
- set SecurityBox = Server.CreateObject("AdvFusionBox.FusionBox")
- SecurityBox.Login(Request.Form("Password"))
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set SecurityBox = nothing
- Response.Redirect("index.asp?result=0")
- else
- Session("Index") = "Index"
- set Rst = SecurityBox.GetRegVal("", "InstallationPath", "String")
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set SecurityBox = nothing
- Response.Redirect("index.asp?result=0")
- end if
- set Result = SecurityBox.ReturnValues("Admin.ini", "Settings", "Installed")
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set Rst = nothing
- set SecurityBox = nothing
- Response.Redirect("index.asp?result=0")
- end if
- set File = Server.CreateObject("Scripting.FileSystemObject")
- DspText = ""
- ActText = vbCrLf & "%" & ">"
- JSCodeText = ""
- for each Member in Result
- DspFileName = Rst.Value & "\Admin\dsp_admin_" & Member.Value & ".asp"
- ActFileName = Rst.Value & "\Admin\act_admin_" & Member.Value & ".asp"
- if (File.FileExists(DspFileName) and File.FileExists(ActFileName)) then
- DspText = DspText & vbCrLf & "<!--- #include file = 'dsp_admin_" & Member.Value & ".asp' --->"
- ActText = ActText & vbCrLf & "<!--- #include file = 'act_admin_" & Member.Value & ".asp' --->"
- JSCodeText = JSCodeText & vbCrLf & "if (!admin_" & LCase(Member.Value) & "()) return false;"
- end if
- next
- set File = nothing
- set Result = nothing
- ActText = ActText & vbCrLf & "<" & "%"
- SecurityBox.Insert Rst.Value & "\Admin\dsp_welcome.asp", DspText, "<!--- ASP Include Start Mark --->", "<!--- ASP Include End Mark --->"
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set Rst = nothing
- set SecurityBox = nothing
- Response.Redirect("index.asp?result=0")
- end if
- SecurityBox.Insert Rst.Value & "\Admin\act_welcome.asp", ActText, "'ASP Include Start Mark", "'ASP Include End Mark"
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set Rst = nothing
- set SecurityBox = nothing
- Response.Redirect("index.asp?result=0")
- end if
- SecurityBox.Insert Rst.Value & "\Admin\index.js", JSCodeText, "/* JS Code Start Mark */", "/* JS Code End Mark */"
- set Rst = nothing
- if (SecurityBox.IsError = 1) then
- Session("Error") = SecurityBox.ErrorReason
- set SecurityBox = nothing
- Response.Redirect("index.asp?result=0")
- end if
- set SecurityBox = nothing
- Response.Redirect("dsp_welcome.asp")
- end if
- else
- Response.Redirect("index.asp")
- end if
- %>